﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using Common;

using BusinessEntity.Common;

namespace BusinessEntity.Patient
{
    [DataContract]
    public class PatientVisit
    {
        private VisitStatusType visitStatusId;
       
        [DataMember]
        public int? Id { get; set; }
        
        [DataMember]
        public string VisitStatus { get; set; }
        
        [DataMember]
        public VisitStatusType VisitStatusId
        {
            get
            {
                return visitStatusId;
            }
            set
            {
                visitStatusId = value;
            }
        }
        
        [DataMember]        
        public int? VisitStatusIdInt
        {
            get
            {
                return (int)visitStatusId;
            }
            set
            {
                visitStatusId = (VisitStatusType)value;
            }
        }

        [DataMember]
        public PatientAppointment PatientAppointment { get; set; }
       
        [DataMember]
        public bool IsActive { get; set; }
      
        [DataMember]
        public PatientNote PatientNote { get; set; }

       
        [DataMember]
        public DateTime? VisitDate
        {
            get
            {
                if (PatientAppointment == null)
                    return null;

                return PatientAppointment.StartDate;
            }
            set
            {
                //PatientAppointment.StartDate = value;
            }
        }
        [DataMember]
        public Log Log { get; set; }
    }
}
